package routers

import (
	"databaseStudy/controllers"

	beego "github.com/beego/beego/v2/server/web"
)

func init() {
	var apiNS = beego.NewNamespace("/api",
		beego.NSRouter("/login", &controllers.LoginController{}),
		beego.NSRouter("/checkToken",&controllers.CheckTokenController{}),
		beego.NSRouter("/getEmpInfo",&controllers.GetEmpInfoController{}),
		beego.NSRouter("/getDepInfo",&controllers.GetDepInfoController{}),
		beego.NSRouter("/getTransInfo",&controllers.GetTransInfoController{}),
		beego.NSRouter("/createNewEmp",&controllers.CreateNewEmp{}),
		beego.NSRouter("/createNewDep",&controllers.CreateNewDep{}),
		beego.NSRouter("/updateEmp",&controllers.UpdateEmpController{}),
		beego.NSRouter("/transEmp",&controllers.TransEmpController{}),
		beego.NSRouter("/backup",&controllers.BackController{}),
		)
	beego.AddNamespace(apiNS)
	beego.Router("/", &controllers.MainController{})

}
